interface Persons {
  id: number;
  names?: string;
  ages?: number;
}

type obj = Persons;
function test(): obj {
  return {
      id: 1,
      names: '张三',
      ages: 18
    }
}
